package com.android.loveandhate.detector.marker;

import java.io.InputStream;
import java.util.HashMap;
import java.util.Map;

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.view.View;

public class Image extends View {
	private Bitmap sourceImage;
	
	public Image(Context context) {
		super( context );
	}
	
	public void load( int img ) {
		InputStream maskImgStream = this.getResources().openRawResource(img);
		sourceImage = BitmapFactory.decodeStream(maskImgStream);
	}
	
	public Map<Character, Integer> getImageSize( Bitmap image ) {
		Map<Character, Integer> size = new HashMap<Character, Integer>();
		size.put('x', image.getWidth());
		size.put('y', image.getHeight() );
		return size;
	}
	
	public Bitmap getResizedImage( int width, int height ) {
		return Bitmap.createScaledBitmap(sourceImage, width, height, false);
	}
	
	public Bitmap getImage() {
		return sourceImage;
	}
	
	public void getImageWidth() {
		
	}
	
	
}
